package com.weitu.permission.roleGroup.service.impl;

import com.weitu.permission.roleGroup.entity.RoleGroup;
import com.weitu.permission.roleGroup.mapper.RoleGroupMapper;
import com.weitu.permission.roleGroup.service.RoleGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by smp on 2017/3/17.
 */
@Service
public class RoleGroupServiceImpl implements RoleGroupService {
    private final RoleGroupMapper roleGroupMapper;
    @Autowired
    public RoleGroupServiceImpl(RoleGroupMapper roleGroupMapper){
        this.roleGroupMapper=roleGroupMapper;
    }

    @Override
    public List<RoleGroup> queryRoleGroupList(Map<String, Object> map) {
        return this.roleGroupMapper.queryRoleGroupList(map);
    }

    @Override
    public RoleGroup queryRoleGroupById(String id) {
        return this.roleGroupMapper.queryRoleGroupById(id);
    }

    @Override
    public int queryCount(Map<String, Object> map) {
        return this.roleGroupMapper.queryCount(map);
    }

    @Override
    public int insertRoleGroup(RoleGroup roleGroup) {
        return this.roleGroupMapper.insertRoleGroup(roleGroup);
    }

    @Override
    public int deleteRoleGroup(String id) {
        return this.roleGroupMapper.deleteRoleGroup(id);
    }

    @Override
    public int updateRoleGroup(RoleGroup roleGroup) {
        return this.roleGroupMapper.updateRoleGroup(roleGroup);
    }

    @Override
    public List<RoleGroup> queryRoleGroupListAll() {
        return this.roleGroupMapper.queryRoleGroupListAll();
    }

    @Override
    public int queryCountByCode(String code) {
        return this.roleGroupMapper.queryCountByCode(code);
    }
}
